A Quantitative Analysis of Space Waste from Java Strings and its Elimination at Garbage Collection Time

نویسندگان

  • Kiyokuni Kawachiya
  • Kazunori Ogata
  • Tamiya Onodera
چکیده

This paper describes a novel approach to reduce the memory consumption of Java programs, by reducing the string memory waste in the runtime. In recent Java applications, string data occupies a large amount of the heap area. For example, more than 30% of the live heap area is used for string data when WebSphere Application Server with Trade6 is running. By investigating the string data in real Java applications, we found two types of memory waste in typical string implementations in Java. First, there are many String objects which have the same values. Second, there are many unused areas in the char arrays used to hold the string values. This string memory waste exists as or in live objects, so it cannot not be eliminated by existing garbage collection techniques, which only remove dead objects. Quantitative analysis of Java heap revealed that such waste occupied up to 17% of the live heap area even in real Java applications. To remove the string memory waste, we propose a new “string garbage collection” (StringGC) technique for Java. The StringGC works with a usual garbage collector in a JVM, unifying same-value String objects and removing the unused areas in char arrays. In an IBM production JVM, we implemented a StringGC prototype named “UNITE”, where same-value strings are unified when they are tenured by a generational GC. This prototype was able to eliminate more than 90% of the string memory waste, and the live heap size of real Java applications was reduced by up to 15% without noticeable performance degradation.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Routing Vehicle of Urban Waste Collection Utilities GIS

Municipal solid waste collection is expensive and, in some cities, 46–85% of their whole waste management expenses are used for waste collection and transportation. Rapid urbanization and every day human actions generate a large amount of waste from residential, commercial, or industrial extents all over the world. Waste collection optimization can decrease the waste collection budget and envir...

متن کامل

Quantitative dynamic-memory analysis for Java

Spaceand time-predictability are hard to achieve for object-oriented languages with automated dynamic-memory management. Although there has been significant work to design APIs, such as the Real-Time Specification for Java (RTSJ), and to implement garbage collectors to enable real-time performance, quantitative space analysis is still in its infancy. This work presents the integration of a seri...

متن کامل

Automatic Memory Management for Embedded Real-Time Java Processor Jpor-32

Currently, Java has been gradually applied in embedded real-time areas like robotics, control system, etc. owning to its advantages like robustness, security, etc. In order to improve the performance of Java’s execution engine for embedded real-time applications, JPOR-32, an embedded real-time Java processor, is designed. Based on it, this paper presents the automatic memory management (AMM) me...

متن کامل

CRAMM: Cooperative Robust Automatic Memory Management

C Project Description Programming languages that rely on garbage collection are becoming ubiquitous. Java and C# are especially popular. Both languages provide numerous software engineering advantages over languages like C and C++. The advantages of garbage collection include safety from accidental memory overwrites, protection from security violations, and the automatic prevention of space lea...

متن کامل

Cost Analysis for Real - time Java Scoped - memory Areas ∗

Java has recently joined C and C++ as a development platform for real-time and embedded applications. Java’s garbage collection, while generally a useful feature, can be problematic for these applications: garbage collection occurs at unpredictable times and its latency is typically unbounded. This can compromise necessary real-time guarantees. To overcome these limitations, the Real-Time for J...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007